//
//  AddViewController.m
//  HomeWork_10
//
//  Created by dllo on 16/3/22.
//  Copyright © 2016年 chen. All rights reserved.
//

#import "AddViewController.h"
#import "MyLabel.h"
@interface AddViewController ()<UITextFieldDelegate>

@end

@implementation AddViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"添加联系人";
    self.view.backgroundColor = [UIColor whiteColor];
    [self createSubView];
}

- (void)createSubView{
    UITextField *text1 = [[UITextField alloc]initWithFrame:CGRectMake(150, 200, 200, 50)];
    [self.view addSubview:text1];
    text1.borderStyle = 2.5;
    text1.delegate = self;
    [text1 release];
    
    UITextField *text2 = [[UITextField alloc]initWithFrame:CGRectMake(150, 300, 200, 50)];
    [self.view addSubview:text2];
    text2.borderStyle = 2.5;
    text2.delegate = self;
    [text2 release];
    
    
    MyLabel *name = [[MyLabel alloc]initWithFrame:CGRectMake(30, 200, 100, 50)];
    [self.view addSubview:name];
    name.text = @"name:";
    [name release];
    
    MyLabel *PhoneNumber = [[MyLabel alloc]initWithFrame:CGRectMake(30, 300, 150, 50)];
    [self.view addSubview:PhoneNumber];
    PhoneNumber.text = @"phoneNumber:";
    [PhoneNumber release];
}


- (BOOL)textFieldShouldReturn:(UITextField *)textField{
    [textField resignFirstResponder];
    return YES;
}

















- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
